import { obtainPersonalTeacher } from '../../../config/api'
import * as actionTypes from './actionTypes';

const getPersonalTeacher = (data) => ({
	type: actionTypes.Get_Personal_Teacher,
	data
});

// 获取 我的老师 数据
export const acquirePersonalTeacherData = ( batch_id ) => {
	return async (dispatch) => {
		const resultInfo = await obtainPersonalTeacher(batch_id)
		if (resultInfo.status === 200) {
			dispatch(getPersonalTeacher(resultInfo.data));
		}
		console.log(resultInfo.data, '获取 我的老师 数据')
	}
};